package model

import javafx.scene.paint.Paint
import model.abstractClass.BlockableView
import model.inter.Blockable
import model.inter.DestoryAble
import model.inter.Sufferable
import org.itheima.kotlin.game.core.Painter
import java.awt.Rectangle

/**
 * 这里是Wall的墙的逻辑；
 */
class Wall(override var x:Int=0, override var y:Int=0):BlockableView(x=x,y=y),DestoryAble,Sufferable{


    override var totalBlood: Int=3


    override fun isNeedDestory(): Boolean {

        //println("wallBlood: ${this.totalBlood}")
        return totalBlood<0;
    }


    override fun draw() {
        //这里我们需要把水画出来；
        Painter.drawImage("img/wall.gif",x,y)
    }

}